{% load debusine %}
<table class="table table-sm" id="collection-item-list">
    {% widget paginator.thead %}
    <tbody>
        {% for item in paginator.page_obj.object_list %}
            <tr>
                <td>{{ item.category }}</td>
                <td>
                    {% if item.artifact %}
                        <a href="{{ item.artifact.get_absolute_url }}">{{ item.name }}</a>
                    {% elif item.collection %}
                        <a href="{{ item.collection.get_absolute_url }}">{{ item.name }}</a>
                    {% else %}
                        <a href="{{ item.get_absolute_url }}">{{ item.name }}</a>
                    {% endif %}
                </td>
                <td>{{ item.created_at|date:"Y-m-d H:i" }}</td>
                <td>
                    <div class="btn-group btn-group-sm"
                         role="group"
                         aria-label="Item shortcuts">
                        {% ui_shortcuts item as shortcuts %}
                        {% for shortcut in shortcuts %}
                            {% widget shortcut %}
                        {% endfor %}
                    </div>
                </td>
            </tr>
        {% empty %}
            <tr>
                <td colspan="{{ table.columns|length }}">There are no rows to show matching the current filter</td>
            </tr>
        {% endfor %}
    </tbody>
    {% widget paginator.tfoot %}
</table>
